/*
 * StringUtils.h
 *
 *  Created on: Feb 28, 2012
 *
 *  Created on: Dec 12, 2011
 *      Author: Michael Anderson
 *      Part of Team 955 Battery Cart project
 *      compiled on Eclipse with Arduino libraries and avr-gcc
 */

#ifndef STRINGUTILS_H_
#define STRINGUTILS_H_

#include <Arduino.h>
#include <HardwareSerial.h>
#include <stdio.h>
#include "enums.h"
//#include "main.h"
#include "strings.h"

class Utils {
public:
    Utils();
    static char getOnesDigit(uint16_t);
    static void doubleToCharArray(char* buf, uint8_t len, double d, uint8_t precision);
    static uint16_t safeAnalogRead(uint8_t);
    static uint16_t filteredAnalogRead(uint8_t pin, analog_read_filter_type filter);
    static void getFlashString(uint8_t* buffer, uint8_t index);
    //static void showError(uint8_t* message);
};

#endif /* STRINGUTILS_H_ */
